# utils/config.py
import yaml
import os

class ConfigManager:
    _instance = None
    
    def __new__(cls):
        if not cls._instance:
            cls._instance = super().__new__(cls)
            cls._instance._load_config()
        return cls._instance
    
    def _load_config(self):
        config_path = os.path.join(os.path.dirname(__file__), '..', 'config.yaml')
        with open(config_path) as f:
            self.config = yaml.safe_load(f)
            
    @property
    def capabilities(self):
        return self.config['capabilities']
    
    @property
    def credentials(self):
        return self.config['credentials']
    
    @property
    def locators(self):
        return self.config['locators']